<!DOCTYPE html>
<html>
    {% load static %}
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

		<title>个人资料</title>

		<link href="{% static 'assets/css/admin.css' %}" rel="stylesheet" type="text/css">
		<link href="{% static 'assets/css/amazeui.css' %}" rel="stylesheet" type="text/css">

		<link href="{% static 'css/personal.css' %}" rel="stylesheet" type="text/css">
		<link href="{% static 'css/infstyle.css' %}" rel="stylesheet" type="text/css">
		<script src="{% static 'assets/js/jquery.min.js' %}" type="text/javascript"></script>
		<script src="{% static 'assets/js/amazeui.js' %}" type="text/javascript"></script>
			
	</head>

	<body>

        {% include 'person/top.html' %}
		<div class="center">
			<div class="col-main">
				<div class="main-wrap">

					<div class="user-info">
						<!--标题 -->
						<div class="am-cf am-padding">
							<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">个人资料</strong> / <small>Personal&nbsp;information</small></div>
						</div>
						<hr/>
                        {% if user.is_authenticated %}
						<!--头像 -->
						<div class="user-infoPic">

							<div class="filePic">
								<input type="file" class="inputPic" allowexts="gif,jpeg,jpg,png,bmp" accept="image/*">
								<img class="am-circle am-img-thumbnail" src="{% static 'images/getAvatar.do.jpg' %}" alt="" />
							</div>

							<p class="am-form-help">头像</p>

                                <div class="info-m">
                                    <div><b>用户名：<i>{{ user.username }}</i></b></div>
                                    <div class="u-level">
                                        <span class="rank r2">
                                            <s class="vip1"></s><a class="classes" href="#">{{ member }}</a>
                                        </span>
                                    </div>
                                    <div class="u-safety">
                                        <a href="#">
                                            账户安全
                                            <span class="u-profile"><i class="bc_ee0000" style="width: 60px;" width="0">60分</i></span>
                                        </a>
                                    </div>
                                </div>
                            {% else %}
                                <div class="info-m">
                                    <div><b>用户名：<i>请登录！！</i></b></div>
                                    <div class="u-level">
                                        <span class="rank r2">
                                            <s class="vip1"></s><a class="classes" href="#">用户等级</a>
                                        </span>
                                    </div>
                                    <div class="u-safety">
                                        <a href="#">
                                            账户安全
                                            <span class="u-profile"><i class="bc_ee0000" style="width: 60px;" width="0">60分</i></span>
                                        </a>
                                    </div>
                                </div>
                            {% endif %}
						</div>

						<!--个人信息 -->
						<div class="info-main">
							<form class="am-form am-form-horizontal" action="{% url 'myself:myself_information_handle' %}" method="post">
                            {% csrf_token %}
                                {% if user.is_authenticated %}
                                    <div class="am-form-group">
                                        <label for="user-name2" class="am-form-label">昵称</label>
                                        <div class="am-form-content">
                                            <input type="text" id="user-name2" placeholder="nickname" name="nickname" value="{{ user.username }}">
                                        </div>
                                    </div>
                                {% else %}
                                    <div class="am-form-group">
                                        <label for="user-name2" class="am-form-label">昵称</label>
                                        <div class="am-form-content">
                                            <input type="text" id="user-name2" placeholder="nickname" name="nickname">
                                        </div>
                                    </div>
                                {% endif %}
								<div class="am-form-group">
									<label for="user-name" class="am-form-label">姓名</label>
									<div class="am-form-content">
										<input type="text" id="user-name2" placeholder="name" name="tusername">

									</div>
								</div>

								<div class="am-form-group">
									<label class="am-form-label">性别</label>
									<div class="am-form-content sex">
										<label class="am-radio-inline">
											<input type="radio" name="radio10" value="男" data-am-ucheck> 男
										</label>
										<label class="am-radio-inline">
											<input type="radio" name="radio10" value="女" data-am-ucheck> 女
										</label>
										<label class="am-radio-inline">
											<input type="radio" name="radio10" value="保密" data-am-ucheck> 保密
										</label>
									</div>
								</div>

								<div class="am-form-group">

									<label for="user-birth" class="am-form-label">生日</label>
									<div class="am-form-content birth">
                                        <input type="date" placeholder="填入年月日" name="birth">
									</div>
							
								</div>
                                {% if user.is_authenticated %}
                                    {% for foo in user1111 %}
                                        {% if foo.phone is None %}
                                            <div class="am-form-group">
                                                <label for="user-phone" class="am-form-label">电话</label>
                                                <div class="am-form-content">
                                                    <input id="user-phone" placeholder="telephonenumber" type="tel" name="phone">
                                                </div>
                                            </div>
                                        {% else %}
                                            <div class="am-form-group">
                                                <label for="user-phone" class="am-form-label">电话</label>
                                                <div class="am-form-content">
                                                    <input id="user-phone" name="phone" placeholder="telephonenumber" type="tel" value="{{ foo.phone }}">
                                                </div>
                                            </div>
                                        {% endif %}
                                    {% endfor %}
                                 {% else %}
                                    <div class="am-form-group">
                                        <label for="user-phone" class="am-form-label">电话</label>
                                        <div class="am-form-content">
                                            <input id="user-phone" name="phone" placeholder="telephonenumber" type="tel" value="11736385">
                                        </div>
                                    </div>
                                {% endif %}
                            {% if user.is_authenticated %}
                                {% for foo in user1111 %}
                                    {% if foo.email is None %}
                                        <div class="am-form-group">
                                            <label for="user-email" class="am-form-label">电子邮件</label>
                                            <div class="am-form-content">
                                                <input id="user-email" placeholder="Email" type="email" name="email">
                                            </div>
                                        </div>
                                    {% else %}
                                        <div class="am-form-group">
                                            <label for="user-email" class="am-form-label">电子邮件</label>
                                            <div class="am-form-content">
                                                <input id="user-email" placeholder="Email" type="email" value="{{ foo.email }}" name="email">
                                            </div>
                                        </div>
                                    {% endif %}
                                {% endfor %}
                            {% else %}
                                <div class="am-form-group">
                                    <label for="user-email" class="am-form-label">电子邮件</label>
                                    <div class="am-form-content">
                                        <input id="user-email" placeholder="Email" type="email" value="" name="email">
                                    </div>
                                </div>
                            {% endif %}
								<div class="am-form-group address">
									<label for="user-address" class="am-form-label">收货地址</label>
									<div class="am-form-content address">
										<a href="address.html">
											<p class="new-mu_l2cw">
												<span class="province">湖北</span>省
												<span class="city">武汉</span>市
												<span class="dist">洪山</span>区
												<span class="street">雄楚大道666号(中南财经政法大学)</span>
												<span class="am-icon-angle-right"></span>
											</p>
										</a>

									</div>
								</div>
								<div class="am-form-group safety">
									<label for="user-safety" class="am-form-label">账号安全</label>
									<div class="am-form-content safety">
										<a href="safety.html">

											<span class="am-icon-angle-right"></span>

										</a>

									</div>
								</div>
								<div class="info-btn">
									<div class="am-btn am-btn-danger"><input type="submit" value="保存修改" style="color: black;background-color: gainsboro"></div>
								</div>
                            <span style="color: blue">{{ success }}</span>
							</form>
						</div>

					</div>

				</div>
				<!--底部-->
				<div class="footer">
					<div class="footer-hd">
						<p>
							<a href="#">恒望科技</a>
							<b>|</b>
							<a href="#">商城首页</a>
							<b>|</b>
							<a href="#">支付宝</a>
							<b>|</b>
							<a href="#">物流</a>
						</p>
					</div>
					<div class="footer-bd">
						<p>
							<a href="#">关于恒望</a>
							<a href="#">合作伙伴</a>
							<a href="#">联系我们</a>
							<a href="#">网站地图</a>
							<em>© 2015-2025 Hengwang.com 版权所有</em>
						</p>
					</div>
				</div>
			</div>

			<aside class="menu">
				<ul>
					<li class="person active">
						<a href="{% url 'myself:index' %}">个人中心</a>
					</li>
					<li class="person">
						<a href="#">个人资料</a>
						<ul>
							<li> <a href="{% url 'myself:myself_information' %}">个人信息</a></li>
							<li> <a href="{% url 'myself:myself_safety' %}">安全设置</a></li>
							<li> <a href="{% url 'myself:address' %}">收货地址</a></li>
						</ul>
					</li>
					<li class="person">
						<a href="#">我的交易</a>
						<ul>
							<li><a href="{% url 'myself:myself_order' %}">订单管理</a></li>
							<li> <a href="{% url 'myself:myself_change' %}">退款售后</a></li>
						</ul>
					</li>
					<li class="person">
						<a href="#">我的资产</a>
						<ul>
							<li> <a href="{% url 'myself:myself_coupon' %}">优惠券 </a></li>
							<li> <a href="{% url 'myself:myself_bonus' %}">红包</a></li>
							<li> <a href="{% url 'myself:myself_bill' %}">账单明细</a></li>
						</ul>
					</li>

					<li class="person">
						<a href="#">我的小窝</a>
						<ul>
							<li> <a href="{% url 'myself:myself_collection' %}">收藏</a></li>
							<li> <a href="{% url 'myself:myself_foot' %}">足迹</a></li>
							<li> <a href="{% url 'myself:myself_comment' %}">评价</a></li>
							<li> <a href="{% url 'myself:myself_news' %}">消息</a></li>
						</ul>
					</li>

				</ul>

			</aside>
		</div>

	</body>

</html>